package com.hqyj.dao;

import com.hqyj.pojo.Orders;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface OrdersDao {
    //添加订单
    int insertOrder(Orders orders);

    //查询所有的订单
    List<Orders> queryOrdersAll();

    //根据状态查询订单
    List<Orders> queryOrderByStatus(int status);

    //根据id修改订单状态
    int updateOrderStatusById(@Param("id") int id, @Param("status") int status);

    //根据id删除订单
    int deleteOrderById(int id);

    //通过customerId去查询订单
    List<Orders> queryOrderByCustomerId(int customerId);

    //查询用户订单
    List<Map<String,Object>> queryUserOrder(String username);

}
